package org.example;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;

public class Demo_del {
    public static void main(String[] args) throws Exception{
        Class.forName("com.mysql.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/dd?serverTimezone=GMT%2B8", "root", "root");
        String name = "dqw";
        int status = 0;
        String sql = "UPDATE student SET status = ? where name = ? ";
        PreparedStatement pst = conn.prepareStatement(sql);
        pst.setString(1,name);
        pst.setInt(2,status);

    }
}
